'''
An RPG Modification for Source games using Source Python.

    Copyright (C) 2013 Steven Hartin

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

Created on 27 Jan 2013

@author: Steven Hartin
@file: ../sourcerpg/popuplib/option.py
'''


class Option(object):
    """Class to store the parameters for a menu option"""
    def __init__(self, text, callback, active=True, *args):
        """Initialise the object

        @param str text The display text for the option
        @param callable callback A callback function to execute when the
            user selects the option
        @param bool active Whether or not the option is selectable
        @param *args Any further args to pass to the callback

        """
        self.text = text
        self.args = args
        self.callback = callback
        self.active = active
